The getOrderId method returns order's orderId. OrderId is used internally by the trading broker and has no meaning inside ActiveTick other than order identification.
var getOrderId();
This method order's id as a string value.
The following example demonstrates the use of getOrderId() method.
function start()
{
//retrieve account's open orders
var account = getAccount();
var openOrders = account.getOrders();
//loop through all orders
for(var i = 0; i < openOrders.length, i++)
{
var order = openOrders[i];
if(order.getOrderType() == ORDERTYPE_LIMIT)
{
var orderId = order.getOrderId();
}
}
//proceed further...
}
Copyright © 2006-2009 ActiveTick LLC